package com.rentao.custom;

import com.rentao.custom.mybatis.MyConfiguration;
import com.rentao.custom.mybatis.MyExecutorImpl;
import com.rentao.custom.mybatis.SqlSession;
import com.rentao.custom.mybatis.TestMapper;

import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class HandwrittenMybatisApplication {

    public static void main(String[] args) {
        // SpringApplication.run(HandwrittenMybatisApplication.class, args);
        SqlSession sqlSession = new SqlSession(new MyConfiguration(), new MyExecutorImpl());

        //返回代理对象
        TestMapper mapper = sqlSession.getMapper(TestMapper.class);

        Object o = mapper.selectByPrimaryKey("1");

        System.out.println(o);
    }

}
